package proxy.dynamicProxy;

public class DynamicProxyTest {

    public static void main(String[] args) {
        // 要用接口类来接而不是实现类
        MyService myService = (MyService) ProxyFactory.getDynamicProxy(new MyServiceImpl());
        
        myService.m1();

        System.out.println("-------------");

        String str = myService.m2();
        System.out.println("返回数据：" + str);
    }

}
